c language logical programs